package cn.kgc.springboot.vue.shiro;

import jakarta.servlet.ServletRequest;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author 课工场
 * @date 2024/12/25
 * @description
 */
public class JwtToken implements AuthenticationToken {

    private String token;
    private ServletRequest servletRequest;

    public JwtToken(String token){
        this.token = token;
    }

    public JwtToken(String token,ServletRequest request){
        this.token = token;
        this.servletRequest = request;
    }


    public ServletRequest  getServletRequest(){
        return this.servletRequest;
    }
    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
